<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>居中显示</title>
    <style>
        a{  
            display: inline-block;
            width: 100px;
            height: 30px;
            margin-left: -5px;
            background-color: black;
            text-align: center;
            /* 竖直居中，建议配合line-height使用，与height的值一致 */
            line-height: 30px;
            color: lightgray;

            padding: 15px 0;
            text-decoration: none;

            position: relative;
            top: -64px;
            left: 0;
        }
        a:hover{
            background-color: lightgray;
            color: black;
        }
        /* */
    </style>
</head>
<body>
    
    <div style="text-align:center;">
        <img src="./img/sf.png" >
    </div>
    <div style="text-align:center;" >
        <a  href="#" >查询快递</a>
        <a  href="#" >查询快递</a>
        <a  href="#" >查询快递</a>
        <a  href="#" >查询快递</a>
        <a  href="#" >查询快递</a>
        <a  href="#" >查询快递</a>
    </div>
</body>
</html>